<script setup>
defineProps({
  isCollapsed: Boolean
})

const emit = defineEmits(['logoClick'])

const handleClick = () => {
  emit('logoClick')
}
</script>

<template>
  <div
      class="logo-container"
      :class="{ 'logo-collapsed': isCollapsed }"
      @click="handleClick"
  >
    <div class="logo-full" v-if="!isCollapsed">
      <span class="logo-text">智识光年</span>
    </div>
    <div class="logo-mini" v-else>
      <span class="logo-initial">N</span>
    </div>
  </div>
</template>

<style scoped>
.logo-container {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0 16px;
  background-color: #038eae;
  border-bottom: 1px solid var(--color-neutral-3);
}

.logo-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-1) !important;
  white-space: nowrap;
}

.logo-initial {
  font-size: 20px;
  font-weight: 700;
  color: rgb(var(--primary-6));
}

.logo-container:hover {
  background-color: var(--color-fill-2);
}

.logo-collapsed {
  padding: 0 8px;
}
</style>